# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.VMwareEngine.V1.Model.NetworkConfig do
  @moduledoc """
  Network configuration in the consumer project with which the peering has to be done.

  ## Attributes

  *   `dnsServerIp` (*type:* `String.t`, *default:* `nil`) - Output only. DNS Server IP of the Private Cloud. All DNS queries can be forwarded to this address for name resolution of Private Cloud's management entities like vCenter, NSX-T Manager and ESXi hosts.
  *   `managementCidr` (*type:* `String.t`, *default:* `nil`) - Required. Management CIDR used by VMware management appliances.
  *   `managementIpAddressLayoutVersion` (*type:* `integer()`, *default:* `nil`) - Output only. The IP address layout version of the management IP address range. Possible versions include: * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address layout used by some existing private clouds. This is no longer supported for new private clouds as it does not support all features. * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address layout used by all newly created private clouds. This version supports all current features.
  *   `vmwareEngineNetwork` (*type:* `String.t`, *default:* `nil`) - Optional. The relative resource name of the VMware Engine network attached to the private cloud. Specify the name in the following form: `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` where `{project}` can either be a project number or a project ID.
  *   `vmwareEngineNetworkCanonical` (*type:* `String.t`, *default:* `nil`) - Output only. The canonical name of the VMware Engine network in the form: `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :dnsServerIp => String.t() | nil,
          :managementCidr => String.t() | nil,
          :managementIpAddressLayoutVersion => integer() | nil,
          :vmwareEngineNetwork => String.t() | nil,
          :vmwareEngineNetworkCanonical => String.t() | nil
        }

  field(:dnsServerIp)
  field(:managementCidr)
  field(:managementIpAddressLayoutVersion)
  field(:vmwareEngineNetwork)
  field(:vmwareEngineNetworkCanonical)
end

defimpl Poison.Decoder, for: GoogleApi.VMwareEngine.V1.Model.NetworkConfig do
  def decode(value, options) do
    GoogleApi.VMwareEngine.V1.Model.NetworkConfig.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.VMwareEngine.V1.Model.NetworkConfig do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
